//
//  BindingVC.swift
//  Xiaozihui
//
//  Created by 校企荟 on 2017/8/28.
//  Copyright © 2017年 校企荟. All rights reserved.
//

import UIKit

class BindingVC: BaseVC {

    lazy var nameTF : UITextField = {
        let tf = UITextField()
        tf.placeholder = "请输入资产名称"
        return tf
    }()
    
    lazy var accountTF :UITextField = {
        let tf = UITextField()
        tf.placeholder = "请输入绑定者手机号"
        return tf
    }()
    
    lazy var nameLbl : UILabel = {
        return UILabel(content: "资产名称", textFont: UIFont.boldSystemFont(ofSize: 15 * ScaleX), color: XZHColor(red: 85, green: 85, blue: 85, alpha: 1), alignment: .center, numberOfLine: 1)
    }()
    
    lazy var accountLbl : UILabel = {
        return UILabel(content: "绑定者账号", textFont: UIFont.boldSystemFont(ofSize: 15 * ScaleX), color: XZHColor(red: 85, green: 85, blue: 85, alpha: 1), alignment: .center, numberOfLine: 1)
    }()
    
    lazy var comfirmBtn : UIButton = {
        let btn = UIButton()
        let attriStr = NSAttributedString(string: "", attributes: [NSForegroundColorAttributeName:UIColor.white,NSFontAttributeName:UIFont.systemFont(ofSize: 15 * ScaleX)])
        btn.setAttributedTitle(attriStr, for: .normal)
        btn.backgroundColor = mainColor
        btn.layer.cornerRadius = 5
        btn.layer.masksToBounds = true
        return btn
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    override func setupUI() {
        view.addSubview(nameLbl)
        view.addSubview(nameTF)
        view.addSubview(accountLbl)
        view.addSubview(accountTF)
        view.addSubview(comfirmBtn)
        
        nameLbl.snp.makeConstraints { (make) in
            make.left.equalTo(view).offset(30)
            make.top.equalTo(view).offset(20)
            make.width.equalTo(85 * ScaleX)
        }
        
        accountLbl.snp.makeConstraints { (make) in
            make.left.width.equalTo(nameLbl)
            make.top.equalTo(nameLbl.snp.bottom).offset(20)
        }
        
        nameTF.snp.makeConstraints { (make) in
            make.centerY.equalTo(nameLbl)
            make.left.equalTo(nameLbl.snp.right).offset(15)
            make.right.equalTo(view).offset(30)
        }
        
        accountTF.snp.makeConstraints { (make) in
            make.centerY.equalTo(accountLbl)
            make.left.width.equalTo(nameTF)
        }
        
        comfirmBtn.snp.makeConstraints { (make) in
            make.centerX.equalTo(view)
            make.top.equalTo(accountLbl.snp.bottom).offset(60)
            make.width.equalTo(130 * ScaleX)
            make.height.equalTo(30 * ScaleX)
        }
    }

}
